package com.example.administrator.dagger2demo.ui.work;

import android.util.Log;

import dagger.Module;
import dagger.Provides;

/**
 * dagger2 模块 通过注入View 给P层 WorkPresenter ,@Inject 标记 {@link WorkPresenter }构造函数
 * {@link WorkPresenter }
 */
@Module
public class WorkPresenterModule {

    private final WorkContract.View mview;

    public WorkPresenterModule(WorkContract.View view) {
        Log.i("TAG", view == null ? "进入了...WorkPresenterModule-is null" : "进入了...WorkPresenterModule-not null");
        this.mview = view;
    }

    @Provides
    WorkContract.View provideWorkContractView() {
        return mview;
    }

}
